package tiandang.core.dao;

import org.apache.ibatis.annotations.Param;
import tiandang.core.model.ProductStock;

public interface ProductStockMapper {

  int deleteByByProductId(Integer productId);

  int insert(ProductStock record);

  int insertSelective(ProductStock record);

  ProductStock selectByProductId(Integer productId);

  int updateByProductId(ProductStock record);

  int decreaseStock(@Param("productId") Integer productId, @Param("amount") Integer amount);

  int increaseStock(@Param("productId") Integer productId, @Param("amount") Integer amount);

}